SQL: 2 books in 1: Beginner and Intermediate Level SQL From The Ground Up by Dvorjak Keith

SQL: 2 books in 1: Beginner and Intermediate Level SQL From The Ground Up by Dvorjak Keith

Author:Dvorjak, Keith [Dvorjak, Keith]
Language: eng
Format: azw3, epub
Published: 2019-01-26T16:00:00+00:00


SELECT * FROM ENGINEERING_STUDENTS GROUP BY ENGG_NAME;

+ - - - - - - - + - - - - - - - - - - - - - -+ - - - - - - - - - - - - - - - - - - +

| ENGG_ID | ENGG_NAME | STUDENT_STRENGTH |

+ - - - - - - - + - - - - - - - - - - - - - -+ - - - - - - - - - - - - - - - - - - +

| 5 | Biomedical | 72 |

| 7 | Chemical | 75 |

| 8 | Civil | 60 |

| 10 | Electrical | 60 |

| 1 | Electronics | 150 |

| 9 | Electronics & Com | 250 |

| 3 | Genetic | 75 |

| 6 | Instrumentation | 80 |

| 4 | Mechanical | 150 |

| 2 | Software | 250 |

+ - - - - - - - + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - +

SELECT * FROM ENGINEERING_STUDENTS GROUP BY ENGG_NAME HAVING STUDENT_STRENGTH > 60;

+ - - - - - - - -+ - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -+

| ENGG_ID | ENGG_NAME | STUDENT_STRENGTH |

+ - - - - - - - -+ - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -+

| 5 | Biomedical | 72 |

| 7 | Chemical | 75 |

| 1 | Electronics | 150 |

| 9 | Electronics & Com | 250 |

| 3 | Genetic | 75 |

| 6 | Instrumentation | 80 |

| 4 | Mechanical | 150 |

| 2 | Software | 250 |

+ - - - - - - - -+ - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -+

The above results are grouped as per ENGG_NAME. Now try out the following example:

SELECT * FROM ENGINEERING_STUDENTS WHERE STUDENT_STRENGTH<100 GROUP BY ENGG_NAME, ENGG_ID;

+ - - - - - - - -+ - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -+

| ENGG_ID | ENGG_NAME | STUDENT_STRENGTH |

+ - - - - - - - -+ - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - -+

| 3 |



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.